package com.ericsson.enap.modules.ebmLog.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.common.util.LogFileName;
import com.ericsson.common.util.LoggerUtils;
import com.ericsson.enap.modules.ebmLog.task.EbmLogTask;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @description: ebmLog功能主方法入口
 * @author: wangjingshi
 * @create: 2021-04-19 09:16
 */
@Component
public class EbmLogJob implements MainJob {

    private Logger log = LoggerUtils.Logger(LogFileName.EbmLogJob);

    @Autowired
    private QuartzTableManager quartzTableManager;
    @Autowired
    private EbmLogTask ebmLogTask;


    @Override
    public void doTask() {
        log.info("===== do EbmLogJob start =====");
        ebmLogTask.execute();
        /*quartzTableManager.addManualTaskJob("EbmLogTask","EbmLogTask",
                "EbmLogTask","EbmLogTask",
                ManualQuartzJob.class,"0 0/15 * * * ?",ebmLogTask);*/
    }
}
